/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package consumo.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Carlos Taschetto
 */
@Entity
@Table(name = "consumos_cobrado", catalog = "consumodb", schema = "")
@NamedQueries({
    @NamedQuery(name = "ConsumosCobrado.findAll", query = "SELECT c FROM ConsumosCobrado c"),
    @NamedQuery(name = "ConsumosCobrado.findById", query = "SELECT c FROM ConsumosCobrado c WHERE c.id = :id"),
    @NamedQuery(name = "ConsumosCobrado.findByKWhp", query = "SELECT c FROM ConsumosCobrado c WHERE c.kWhp = :kWhp"),
    @NamedQuery(name = "ConsumosCobrado.findByKWhfp", query = "SELECT c FROM ConsumosCobrado c WHERE c.kWhfp = :kWhfp"),
    @NamedQuery(name = "ConsumosCobrado.findByKWp", query = "SELECT c FROM ConsumosCobrado c WHERE c.kWp = :kWp"),
    @NamedQuery(name = "ConsumosCobrado.findByKWfp", query = "SELECT c FROM ConsumosCobrado c WHERE c.kWfp = :kWfp"),
    @NamedQuery(name = "ConsumosCobrado.findByKWhreservado", query = "SELECT c FROM ConsumosCobrado c WHERE c.kWhreservado = :kWhreservado"),
    @NamedQuery(name = "ConsumosCobrado.findByKWreservado", query = "SELECT c FROM ConsumosCobrado c WHERE c.kWreservado = :kWreservado"),
    @NamedQuery(name = "ConsumosCobrado.findByKVArhp", query = "SELECT c FROM ConsumosCobrado c WHERE c.kVArhp = :kVArhp"),
    @NamedQuery(name = "ConsumosCobrado.findByKVArhfp", query = "SELECT c FROM ConsumosCobrado c WHERE c.kVArhfp = :kVArhfp"),
    @NamedQuery(name = "ConsumosCobrado.findByKVArhreservado", query = "SELECT c FROM ConsumosCobrado c WHERE c.kVArhreservado = :kVArhreservado"),
    @NamedQuery(name = "ConsumosCobrado.findByUFERp", query = "SELECT c FROM ConsumosCobrado c WHERE c.uFERp = :uFERp"),
    @NamedQuery(name = "ConsumosCobrado.findByUFERfp", query = "SELECT c FROM ConsumosCobrado c WHERE c.uFERfp = :uFERfp"),
    @NamedQuery(name = "ConsumosCobrado.findByUFERreservado", query = "SELECT c FROM ConsumosCobrado c WHERE c.uFERreservado = :uFERreservado"),
    @NamedQuery(name = "ConsumosCobrado.findByDMCRp", query = "SELECT c FROM ConsumosCobrado c WHERE c.dMCRp = :dMCRp"),
    @NamedQuery(name = "ConsumosCobrado.findByDMCRfp", query = "SELECT c FROM ConsumosCobrado c WHERE c.dMCRfp = :dMCRfp"),
    @NamedQuery(name = "ConsumosCobrado.findByDMCRreservado", query = "SELECT c FROM ConsumosCobrado c WHERE c.dMCRreservado = :dMCRreservado")})
public class ConsumosCobrado implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id", nullable = false)
    private Integer id;
    @Column(name = "kWh_p")
    private Integer kWhp;
    @Column(name = "kWh_fp")
    private Integer kWhfp;
    @Column(name = "kW_p")
    private Integer kWp;
    @Column(name = "kW_fp")
    private Integer kWfp;
    @Column(name = "kWh_reservado")
    private Integer kWhreservado;
    @Column(name = "kW_reservado")
    private Integer kWreservado;
    @Column(name = "kVArh_p")
    private Integer kVArhp;
    @Column(name = "kVArh_fp")
    private Integer kVArhfp;
    @Column(name = "kVArh_reservado")
    private Integer kVArhreservado;
    @Column(name = "UFER_p")
    private Integer uFERp;
    @Column(name = "UFER_fp")
    private Integer uFERfp;
    @Column(name = "UFER_reservado")
    private Integer uFERreservado;
    @Column(name = "DMCR_p")
    private Integer dMCRp;
    @Column(name = "DMCR_fp")
    private Integer dMCRfp;
    @Column(name = "DMCR_reservado")
    private Integer dMCRreservado;
    @JoinColumn(name = "leitura", referencedColumnName = "id", nullable = false)
    @ManyToOne(optional = false)
    private Leitura leitura;

    public ConsumosCobrado() {
    }

    public ConsumosCobrado(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getKWhp() {
        return kWhp;
    }

    public void setKWhp(Integer kWhp) {
        this.kWhp = kWhp;
    }

    public Integer getKWhfp() {
        return kWhfp;
    }

    public void setKWhfp(Integer kWhfp) {
        this.kWhfp = kWhfp;
    }

    public Integer getKWp() {
        return kWp;
    }

    public void setKWp(Integer kWp) {
        this.kWp = kWp;
    }

    public Integer getKWfp() {
        return kWfp;
    }

    public void setKWfp(Integer kWfp) {
        this.kWfp = kWfp;
    }

    public Integer getKWhreservado() {
        return kWhreservado;
    }

    public void setKWhreservado(Integer kWhreservado) {
        this.kWhreservado = kWhreservado;
    }

    public Integer getKWreservado() {
        return kWreservado;
    }

    public void setKWreservado(Integer kWreservado) {
        this.kWreservado = kWreservado;
    }

    public Integer getKVArhp() {
        return kVArhp;
    }

    public void setKVArhp(Integer kVArhp) {
        this.kVArhp = kVArhp;
    }

    public Integer getKVArhfp() {
        return kVArhfp;
    }

    public void setKVArhfp(Integer kVArhfp) {
        this.kVArhfp = kVArhfp;
    }

    public Integer getKVArhreservado() {
        return kVArhreservado;
    }

    public void setKVArhreservado(Integer kVArhreservado) {
        this.kVArhreservado = kVArhreservado;
    }

    public Integer getUFERp() {
        return uFERp;
    }

    public void setUFERp(Integer uFERp) {
        this.uFERp = uFERp;
    }

    public Integer getUFERfp() {
        return uFERfp;
    }

    public void setUFERfp(Integer uFERfp) {
        this.uFERfp = uFERfp;
    }

    public Integer getUFERreservado() {
        return uFERreservado;
    }

    public void setUFERreservado(Integer uFERreservado) {
        this.uFERreservado = uFERreservado;
    }

    public Integer getDMCRp() {
        return dMCRp;
    }

    public void setDMCRp(Integer dMCRp) {
        this.dMCRp = dMCRp;
    }

    public Integer getDMCRfp() {
        return dMCRfp;
    }

    public void setDMCRfp(Integer dMCRfp) {
        this.dMCRfp = dMCRfp;
    }

    public Integer getDMCRreservado() {
        return dMCRreservado;
    }

    public void setDMCRreservado(Integer dMCRreservado) {
        this.dMCRreservado = dMCRreservado;
    }

    public Leitura getLeitura() {
        return leitura;
    }

    public void setLeitura(Leitura leitura) {
        this.leitura = leitura;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConsumosCobrado)) {
            return false;
        }
        ConsumosCobrado other = (ConsumosCobrado) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "consumo.persistence.ConsumosCobrado[id=" + id + "]";
    }

}
